package com.ruoyi.video.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.video.mapper.VideoRelationMapper;
import com.ruoyi.video.domain.VideoRelation;
import com.ruoyi.video.service.IVideoRelationService;

/**
 * 番剧关联Service业务层处理
 *
 * @author ruoyi
 * @date 2022-02-04
 */
@Service
public class VideoRelationServiceImpl implements IVideoRelationService {
    @Autowired
    private VideoRelationMapper videoRelationMapper;

    /**
     * 查询番剧关联
     *
     * @param id 番剧关联主键
     * @return 番剧关联
     */
    @Override
    public VideoRelation selectVideoRelationById(String id) {
        return videoRelationMapper.selectVideoRelationById(id);
    }

    /**
     * 查询番剧关联列表
     *
     * @param videoRelation 番剧关联
     * @return 番剧关联
     */
    @Override
    public List<VideoRelation> selectVideoRelationList(VideoRelation videoRelation) {
        return videoRelationMapper.selectVideoRelationList(videoRelation);
    }

    /**
     * 新增番剧关联
     *
     * @param videoRelation 番剧关联
     * @return 结果
     */
    @Override
    public int insertVideoRelation(VideoRelation videoRelation) {
        return videoRelationMapper.insertVideoRelation(videoRelation);
    }

    /**
     * 修改番剧关联
     *
     * @param videoRelation 番剧关联
     * @return 结果
     */
    @Override
    public int updateVideoRelation(VideoRelation videoRelation) {
        return videoRelationMapper.updateVideoRelation(videoRelation);
    }

    /**
     * 批量删除番剧关联
     *
     * @param ids 需要删除的番剧关联主键
     * @return 结果
     */
    @Override
    public int deleteVideoRelationByIds(String[] ids) {
        return videoRelationMapper.deleteVideoRelationByIds(ids);
    }

    /**
     * 删除番剧关联信息
     *
     * @param id 番剧关联主键
     * @return 结果
     */
    @Override
    public int deleteVideoRelationById(String id) {
        return videoRelationMapper.deleteVideoRelationById(id);
    }

    @Override
    public int deleteVideoRelationByRelationId(String id) {
        return videoRelationMapper.deleteVideoRelationByRelationId(id);
    }
}
